using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class IP_DeliveryMap : EntityTypeConfiguration<IP_Delivery>
    {
        public IP_DeliveryMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.Notes)
                .HasMaxLength(200);

            // Table & Column Mappings
            this.ToTable("IP_Delivery");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.IP_UID).HasColumnName("IP_UID");
            this.Property(t => t.Date).HasColumnName("Date");
            this.Property(t => t.Notes).HasColumnName("Notes");
        }
    }
}
